<template>
  <div class="one">
      <top col="精彩评论" />

      <comm v-for="item in data" :key="item.id" :postdata="item" />

      <comments :commentss='fr' />
  </div>
</template>

<script>
import top from '@/components/module/top'
import comm from '@/components/comment/indexs'
import comments from '../../components/inModule/commets'  //评论组件
export default {
    components:{
        top,
        comm,
        comments,
    },
    data(){
        return{
            data:[],
            fr:{
                index:'',
                star:''
            }
        }
    },
    created(){
        this.$axios({
            url:'/post_comment/' + this.$route.params.id
        }).then(res=>{
            console.log("精彩评论数据");
            this.fr.index = res.data.data.length
            console.log(res.data.data);
            this.data = res.data.data
        })
    }
}
</script>

<style>

</style>